package com.shuangti;

import java.util.Scanner;
public class Test06 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个数：");
        int a = scanner.nextInt();
        System.out.println("请输入第二个数：");
        int b = scanner.nextInt();
        System.out.println("请输入你想运算的功能：0:表示加法运算,1:表示减法运算,2:表示乘法运算,3:表示除法运算");
        int c = scanner.nextInt();
        if(c==0){
            int d = a+b;
            System.out.println(a+"+"+b+"="+d);
        }

        else if(c==1){
            int d=a-b;
            System.out.println(a+"-"+b+"="+d);
        }
        else  if(c==2){
            int d=a*b;
            System.out.println(a+"*"+b+"="+d);
        }
        else if (c==3){
            int d=a/b;
            System.out.println(a+"/"+b+"="+d);
        }
        else {
            System.out.println("无效");
        }
    }
}
